package com.fjnu.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.List;

/**
 * @desc: 用户实体类
 * @author:
 * @date:
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@Scope("singleton")
@Component
@Builder
public class User {
    private String userId;
    private String username;
    private String password;
    private String salt;
    private String nickname;
    private String email;
    private String phone;
    private Integer sex;
    private Integer age;
    private String img;
    private Date createTime;
    private Date updateTime;
    private Date lastLoginTime;
    /**
     * User关联的多个role属性
     */
    private List<Role> roles;

}
